package com.market.member.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.block.common.constant.AppRspCodeConstant;
import com.block.common.service.IMemberCommonService;
import com.block.common.vo.ResponseVo;
import com.block.db.entity.MemberSourceDictInfo;
import com.block.db.mapper.MemberSourceDictInfoMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.block.common.model.vo.SourceDictVO;
import com.market.member.service.IMemberSourceDictInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 用户资质字典管理 服务实现类
 * </p>
 *
 * @author 
 * @since 2023-08-09
 */
@Service
public class MemberSourceDictInfoServiceImpl extends ServiceImpl<MemberSourceDictInfoMapper, MemberSourceDictInfo> implements IMemberSourceDictInfoService {

    @Autowired
    IMemberCommonService memberCommonService;

    @Override
    public ResponseVo getCommonInfo(String channelCode) {
        /**
         * 查询第一层
         */
        List<SourceDictVO> sourceDictVOList = memberCommonService.getDictDataInfo(channelCode);

        JSONObject jsonObject = new JSONObject();
        jsonObject.put("dataList", sourceDictVOList);

        return new ResponseVo(AppRspCodeConstant.SUCCESS, jsonObject);
    }


}
